//
//  SectionHeaderView.m
//  TrainTree
//
//  Created by wanghui on 2017/9/11.
//  Copyright © 2017年 YouYeShu. All rights reserved.
//

#import "StudySectionHeader.h"
@interface StudySectionHeader()
@property (weak, nonatomic) IBOutlet UIView *sectionView;

@end

@implementation StudySectionHeader

- (void)awakeFromNib {
    [super awakeFromNib];
    self.sectionView.layer.borderWidth = 0.5;
    self.sectionView.layer.borderColor = [UIColor colorWithRed:216.0f/255.0f green:216.0f/255.0f blue:216.0f/255.0f alpha:1.0].CGColor;
    self.showRequiredLine = YES;
}

    // 设置颜色和下划线的隐藏、显示
- (void)setShowRequiredLine:(BOOL)showRequiredLine
{
    if (showRequiredLine) {
        [self.myRequiredCourse setTitleColor:[UIColor colorWithRed:74.0f/255.0f green:74.0f/255.0f blue:74.0f/255.0f alpha:1.0] forState:UIControlStateNormal];

        [self.myOptionalCourse setTitleColor:[UIColor colorWithRed:164.0f/255.0f green:164.0f/255.0f blue:164.0f/255.0f alpha:1.0] forState:UIControlStateNormal];

    }else{
        [self.myOptionalCourse setTitleColor:[UIColor colorWithRed:74.0f/255.0f green:74.0f/255.0f blue:74.0f/255.0f alpha:1.0] forState:UIControlStateNormal];

        [self.myRequiredCourse setTitleColor:[UIColor colorWithRed:164.0f/255.0f green:164.0f/255.0f blue:164.0f/255.0f alpha:1.0] forState:UIControlStateNormal];

    }

    self.requiredLine.hidden = !showRequiredLine;
    self.optionalLine.hidden = showRequiredLine;

}


@end
